{% raw %}
<script type="text/x-template" id="omesaas-product-sku-default">
      {% for sku in skus %}
      {% assign keyIndex = forloop.index %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">
      <div class="cell-item moi-product-sku-label" data-type="key">
      <span class="product-sku-name">{{ sku.name }}
        {%- if sku.isImg -%}
            {%- if productSkuStyle == "image" or productSkuStyle == "color" -%}
            :<span style="font-weight: bold;color:#333;">{{sku.selected_value_label}}</span>
            {%- endif -%}
        {%- endif -%}
     
      </span>
      </div>
      <div class="cell-item moi-product-sku-value" data-type="values">
      <div class="product-sku-values">

        {% for val in sku.value %}
        {%- capture className -%}
        {% if val.available == 0 %}product-sku-values-item-disable{% endif %}
        {% if sku.selected_value == val.value %}product-sku-values-item-active{% endif %}
        {%- endcapture -%}
        
        {%- capture imageClassName -%}
        {%- if val.image != "" and sku.isImg -%}
        product-sku-values-item-image
        {%- endif -%}
        {%- endcapture -%}

        {%- capture imageSizeClassName -%}
        {%- if val.image != "" and sku.isImg -%}
        {%- if productSkuStyle == "image" or productSkuStyle == "image_text" -%}
        {{productSkuSize}}
        {%- endif -%}
        {%- endif -%}
        {%- endcapture -%}


        {%- capture colorClassName -%}
        {%- if productSkuStyle == "color" and sku.isImg -%}product-sku-value-color{%- endif -%}
        {%- endcapture -%}

        <div class="product-sku-values-item {{imageSizeClassName}} {{imageClassName}} {{className}}  {{colorClassName}} {{ 'skyStyle-' | append: theme_config.global.product_sku_style }}   {% if productSkuStyle == "color" and sku.isImg  %}colorRender{% endif %}" data-index="{{ keyIndex }}" data-idx="{{ forloop.index }}" data-value='{{ val | json | escape }}' is_deleteProduct="{{ val.deleteItem }}">
          {%- if val.available == 0 -%}
            <div class="product-sku-values-item-disable-mask"></div>
          {%- endif -%}
         {%- if productSkuStyle == "color" and sku.isImg  -%}
            <div class="product-sku-value-color-item" style='background-color:{{val.colorValue}}'></div>
         {%- elsif  val.image != "" and sku.isImg -%}
          <img data-src="{{val.image.src}}"  src="{{empty_loading.png|public_asset_abs_url}}"  />
            {%- if productSkuStyle == "image_text" -%}
              <span>{{ val.name }}</span>
            {%- endif -%}
          {%- else -%}
            {{ val.name }}
          {%- endif -%}
        </div>
        {% endfor %}

        
          
      </div>
      </div>
      </div>
      {% endfor %}
</script>


<script type="text/x-template" id="omesaas-product-sku-select">
      {% for sku in skus %}
      {% assign keyIndex = forloop.index %}
      <div class="moi-product-option"  data-sku-name="{{ sku.name }}">

      <div class="sku-item-col">
      <div class="cell-item moi-product-sku-label" data-type="key">
      <span class="product-sku-name">{{ sku.name }}</span>
      </div>
      <div class="cell-item moi-product-sku-value" data-type="values">
      <div class="product-sku-values">
        <label class="product-sku-select" >
        <select class="product-sku-unselect">
            {% if checkedFirstSku == '2' %}
              <option  value="0" {% if sku.selected_value == "" %}selected="selected"{% endif %} disabled >{{lang.product.please_select}}</option>
            {% endif %}
            
            {% for val in sku.value %}

            {%- capture disabled -%}
            {% if val.available == 0 %}disabled{% endif %}
            {% if sku.selected_value == val.value %} selected{% endif %}
            {%- endcapture -%}

            <option value='{{val.value}}' {{disabled}}  data-index="{{ keyIndex }}" data-value='{{ val | json | escape }}'>{{ val.name }}</option>
            {% endfor %}
        </select>

        <svg class="product-sku-select-delete" data-index="{{ keyIndex }}" viewBox="0 0 1024 1024" {% if sku.selected_value == "" or checkedFirstSku != '2' %}style="display: none;"{% endif %} version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4673" width="20" height="20"><path d="M804.992 838.229333L240.896 274.133333l33.237333-33.237333 564.096 564.096z" fill="#1D1F21" p-id="4674"></path><path d="M274.133333 838.229333l-33.237333-33.237333L804.992 240.896l33.237333 33.237333z" fill="#1D1F21" p-id="4675"></path></svg>
        <div class="mo-edge" {% if checkedFirstSku == '2' and sku.selected_value != "" %}style="display: none;"{% endif %}></div>
        </label>
      </div>
      </div>
      </div>
      </div>
      {% endfor %}
</script>

{% endraw %}

